<include file="Public/head"/>
<body class="no-skin">
<include file="Public/header"/>
<div class="main-container" id="main-container">
    <script type="text/javascript">
        try {
            ace.settings.check('main-container', 'fixed')
        } catch (e) {
        }
    </script>

    <include file="Public/sidebar"/>
    <div class="main-content">
        <div class="main-content-inner">
            <!-- #section:basics/content.breadcrumbs -->
            <include file="Public/breadcrumbs"/>

            <!-- /section:basics/content.breadcrumbs -->
            <div class="page-content">
                <include file="Public/set"/>

                <!-- /section:settings.box -->
                <div class="row">
                    <div class="col-xs-12">
                        <!-- PAGE CONTENT BEGINS -->
                        <div class="row">
                                <a class="btn btn-info" href="{:U('add')}" value="">新增</a>
                        </div>
                        <div class="space-5"></div>
                        <div class="row">
                            <form id="form" method="post" action="{:U('del')}">
                                <table class="table table-striped table-bordered table-hover">
                                    <thead>
                                    <tr>
                                        <th class="center"><input class="check-all" type="checkbox" value=""></th>
                                        <th>物流公司名称</th>
                                        <th>联系人</th>
										<th>联系人电话</th>
										<th>联系邮箱</th>
                                        <th>地址</th>
										<th>企业性质</th>
                                        <th>企业性质</th>
										<th>本地账户</th>
                                        <th>冻结金额</th>
										<th>保证金</th>
										<th>是否企业资质认证</th>
										<th>是否手机认证</th>
                                        <th>是否邮箱认证</th>
                                        <th class="center">操作</th>
                                    </tr>
                                    </thead>
                                    <tbody>
                                    <style>
                                        .grouptd {
                                            position: relative;
                                        }

                                        .group {
                                            display: inline-block;
                                            width: 100%;
                                        }

                                        .groupselect {
                                            position: absolute;
                                            top: 0;
                                            left: 0;
                                            width: 100%;
                                            height: 100%;
                                            border: 0;
                                        }
                                    </style>
                                    <volist name="list" id="val">
                                        <tr>
                                            <td class="center">
                                                <input class="ids" type="checkbox" name="ids[]" value="{$val['obj_ident']}">
                                            </td>
                                            <td>{$val['company_name']}</td>
                                            <td>{$val['contacts']}</td>
                                            <td>{$val['mobile']}</td>
											<td>{$val['email']}</td>
                                            <td>{$val['province_name']}{$val['city_name']}{$val['area_name']}{$val['address']}</td>
											<td>{$val['nature']}</td>
                                            <td>{$val['scale']}</td>
                                            <td>{$val['money']}</td>
											<td>{$val['freeze_money']}</td>
											<td>{$val['ensure_price']}</td>
										   <td>
											<if condition="($val['is_check_enterprise'] eq 1) "> 未通过
											<elseif condition="$val['is_check_enterprise'] eq 2" />认证通过
											<else /> 未认证
											</if></td>
											<td>
											<if condition="($val['is_check_mobile'] eq 1) "> 未通过
											<elseif condition="$val['is_check_mobile'] eq 2" />认证通过
											<else /> 未认证
											</if></td>
											<td>
											<if condition="($val['is_check_email'] eq 1) "> 未通过
											<elseif condition="$val['is_check_email'] eq 2" />认证通过
											<else /> 未认证
											</if></td>
											<td class="center">
                                                <a href="{:U('edit')}&id={$val['id']}">修改</a>&nbsp;
												 <a href="{:U('detail')}&id={$val['id']}">查看详情</a>&nbsp;
                                                <a class="del" href="javascript:;" val="{:U('del')}&ids={$val['id']}"
                                                title="删除">删除</a>
                                            </td>
                                        </tr>
                                    </volist>
                                    </tbody>
                                </table>
                            </form>
                            <div class="cf">
                                <input id="submit" class="btn btn-info" type="button" value="删除">
                            </div>
                            {$page}
                        </div>
                        <!-- PAGE CONTENT ENDS -->
                    </div><!-- /.col -->
                </div><!-- /.row -->
            </div><!-- /.page-content -->
        </div>
    </div><!-- /.main-content -->
    <include file="Public/footer"/>

</div><!-- /.main-container -->

<include file="Public/footerjs"/>
<!-- inline scripts related to this page -->
<script type="text/javascript">
    $(function () {
        $(".check-all").click(function () {
            $(".ids").prop("checked", this.checked);
        });
        $(".ids").click(function () {
            var option = $(".ids");
            option.each(function (i) {
                if (!this.checked) {
                    $(".check-all").prop("checked", false);
                    return false;
                } else {
                    $(".check-all").prop("checked", true);
                }
            });
        });
        $("#submit").click(function () {
            bootbox.confirm({
                title: "系统提示",
                message: "是否要删除所选物流商？",
                callback: function (result) {
                    if (result) {
                        $("#form").submit();
                    }
                },
                buttons: {
                    "cancel": {"label": "取消"},
                    "confirm": {
                        "label": "确定",
                        "className": "btn-danger"
                    }
                }
            });
        });
        $(".del").click(function () {
            var url = $(this).attr('val');
            bootbox.confirm({
                title: "系统提示",
                message: "是否要删除该物流商?",
                callback: function (result) {
                    if (result) {
                        window.location.href = url;
                    }
                },
                buttons: {
                    "cancel": {"label": "取消"},
                    "confirm": {
                        "label": "确定",
                        "className": "btn-danger"
                    }
                }
            });
        });
    })
</script>
</body>
</html>
